home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
-
- MsgBox ("This example script reads information from a csv file and submits it to a web form." )
-
- 'Tip: For more information on the method used here
- 'search for "Text File Driver" and "Schema.ini" in any search engine
-
-
- Dim iim1, i, iret
-
- set iim1= CreateObject ("iimwsh.iim")
- iret = iim1.iimInit
- iret = iim1.iimDisplay("Submitting Data")
-
- 'Note: The input file name and the number of columns are specified in the macro
- 'You can also specify them inside the script with "iimSet"
-
- 'Loop through the input file
- 'We start at "2" to skip the first header line in the file
- for i = 2 to 4
- 'Set the current read position
- iret = iim1.iimSet("-var_line", cstr(i))
-
- 'Run the macro
- iret = iim1.iimPlay("wsh-csv-2-web")
- If iret < 0 Then
- MsgBox iim1.iimGetLastMessage()
- End If
- next
-
- iret = iim1.iimDisplay("Done!")
- iret = iim1.iimExit
- WScript.Quit(0)
-